fix(e2e): harden Android E2E against launcher ANR and slow cold start#84
Merged
Merged
Conversation
dianaKhortiuk-frontegg
force-pushed
the
fix/e2e-dismiss-anr-dialog
branch
from
June 30, 2026 15:13
0f544e7 to
b6bec22
Compare
dianaKhortiuk-frontegg
force-pushed
the
fix/e2e-dismiss-anr-dialog
branch
from
June 30, 2026 15:43
b6bec22 to
5bfc037
Compare
…ipt line-by-line, so the multi-line run_e2e() function broke; collapse the retry to a single line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Android E2E gate flakes randomly (~1 in 4 runs) across PRs — currently reding #83,
dependabot/…/babel-core, andchore/bump-build-deps-security. Root cause: under CI load the emulator's launcher ANRs and the app's cold start is slow, so the app never reaches the foreground — at failure the UI dump shows only the launcher + an "… isn't responding" dialog, no app views. In CI the suite effectively runs a single test (the other 9 skip — no credentials), so one slow launch reds the whole gate.Two layers of hardening:
Test harness (
UiTestInstrumentation)openAppsetshide_error_dialogs=1(no ANR/crash dialogs over the app) and retries the launch up to 3× until the app package is actually foregrounded, instead of proceeding after a single 5s wait.waitForViewdismisses any residual "isn't responding" dialog (taps Wait) on each poll.CI (
react-native-sdk-e2e.yml)hide_error_dialogs=1on the emulator and retries the test task up to 3× on the same emulator — same approach the native SDK repos use for flaky E2E — so a random launcher hiccup re-runs instead of failing the gate.Stabilizes the whole suite, not one test — should also stop flaking the dependabot/chore PRs.